package com.dyit.dao;

import com.dyit.entity.Borrow;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IBorrowDao extends JpaRepository<Borrow,Integer> {
//    List<Borrow> findAllByUser_id(int user_id);
    //根据借书者id查出借书记录对象
//    @Query(value = "select * from borrow_tab where borrow_user_id=:userid",nativeQuery = true)
//    List<Borrow> findAllByUser_id(@Param("userid") int user_id);


}
